<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <div>{{pmsg}}</div>
        <mess-connt title="父组件传的值"></mess-connt>
        <mess-connt :title='name' content='加值操作'></mess-connt>
    </div>
    <script src="../vue.js"></script>
    <script>
        Vue.component('mess-connt', {
            props: ['title', 'content'],
            data() {
                return {
                    msg: '子组件的值'
                }
            },
            template: `<div>{{msg + "------"+ title + "----" + content}}</div>`
        });
        const vm = new Vue({
            el: "#app",
            data: {
                pmsg: "父组件",
                name: '怎么传不了呢'
            }
        })
    </script>
</body>

</html>